{% if languages|length > 1 %}
<li class="nav-item dropdown">
  <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    {% for language in languages %}
      {% if language.code == code %}
    <img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}">
      {% endif %}
    {% endfor %}  
    <span class="d-none d-md-inline">{{ text_language }}</span>
  </a>
  <div class="dropdown-menu" aria-labelledby="navbarDropdown">
    {% for language in languages %}
      <a href="{{ language.href }}" class="dropdown-item"><img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}"/> {{ language.name }}</a>
    {% endfor %}
  </div>
</li>
{% endif %}